import { PgTab } from '../../plugins'
import './index.scss'

interface IProps{
    curIdx: number
}

function Tab(props:IProps){

    return new PgTab({
        currentIndex: props.curIdx,
        data: [
            {
                navItem: 'nav1',
                pageItem: 'page1'
            },
            {
                navItem: 'nav2',
                pageItem: 'page2'
            },
            {
                navItem: 'nav3',
                pageItem: 'page3'
            },
            {
                navItem: 'nav4',
                pageItem: 'page4'
            }
        ],
        callback(newIdx:number){
            console.log(newIdx)
        }
    }).render()
}
export default Tab